home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
programs
/
lora210e.zip
/
STRUCT.ZIP
/
LORA.H
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-07
|
16KB
|
359 lines
/*
Lora-CBIS Ver. 2.10
Copyright (c) 1989, 1990, 1991, 1992 by Marco Maccaferri.
All rights reserved.
Structure definitions for release
You may use those structures at your own risk. The author cannot guarantee
that this structures are maintained in all future versions of the program.
You can freely (and you are encouraged on that) distribute this file
without limitations.
You can contact the autor at one of the following address:
Marco Maccaferri
BBS : 39-51-6331730 (2:332/402)
BIX : marco.m
Exec-PC: MACCAFERRI MARCO
*/
typedef unsigned int bit;
typedef unsigned int word;
typedef unsigned char byte;
typedef long dword;
struct _stamp
{
unsigned int date; /* (year - 1980) * 512 + month * 32 + day */
unsigned int time; /* hour * 2048 + minute * 32 + second/2 */
};
struct _lastread
{
word area; /* Message area number */
int msg_num; /* Last message read */
};
#define MAXLREAD 30
#define MAXDLREAD 10
#define MAXFLAGS 4
#define MAXCOUNTER 10
struct _usridx /* Structure for the USERS.IDX file */
{
long id; /* User-ID is the 32 bit CRC of the user's name */
};
struct _usr /* Structure for the USERS.BBS file */
{
char name[36]; /* User's name */
char handle[36]; /* User's handle */
char city[26]; /* User's city */
struct _lastread lastread[MAXLREAD]; /* Last messages read for the last
MAXLREAD message areas (used for
QWK selections) */
struct _lastread lastread2[MAXDLREAD]; /* Last messages read for the last
MAXDLREAD message areas */
char pwd[16]; /* User's password (crypted) (*) */
dword times; /* Times the user has called the system */
word nulls; /* Number of nulls (0) sent after a CR/LF */
word msg; /* User's last message area visited */
bit avatar :1; /* 1=Avatar color/graphics enabled */
bit color :1; /* 1=Color codes will be sent */
bit scanmail :1; /* 1=Check for mail at logon */
bit use_lore :1; /* 0=Use the Ansi full screen editor */
bit more :1; /* 1=Pause at the end of each page */
bit ansi :1; /* 1=Ansi color/graphics enabled */
bit kludge :1; /* 1=Display the ^a kludge lines */
bit formfeed :1; /* 1=Screen clearing codes will be sent */
bit hotkey :1; /* 1=Hot keyed menus */
bit tabs :1; /* 0=tabs (9) are converted to spaces */
bit full_read :1; /* 1=Full screen message wiewer */
bit badpwd :1; /* 1=Bad password for the last call */
bit usrhidden :1; /* 1=The user is hidden from the users list */
bit nokill :1; /* 1=Don't kill this user */
bit ibmset :1; /* 1=Character > 127 will be sent */
bit deleted :1; /* 1=User is deleted from the list */
byte language; /* User's language number */
byte priv; /* User's privilege level */
long flags; /* Flags settings */
char ldate[20]; /* User's last call date */
int time; /* Time the user has spent on-line today */
dword upld; /* User's total kbytes uploaded */
dword dnld; /* User's total kbytes downloaded */
word dnldl; /* Users' kbytes downloaded today */
word n_upld; /* Number of files uploaded */
word n_dnld; /* Number of files downloaded */
word files; /* User's last file area visited */
word credit; /* Netmail credit */
word dbase; /* <reserved> (**) */
char signature[58]; /* User's personal signature */
char voicephone[20]; /* User's voice telephone number */
char dataphone[20]; /* User's data telephone number */
char birthdate[10]; /* User's date of birth */
char subscrdate[10]; /* Subscription date <not used> */
char firstdate[20]; /* User's first call date and time */
char lastpwdchange[10];/* User's last password change date */
long ptrquestion; /* Pointer to the answer questionaire file */
byte len; /* User's screen length */
byte width; /* User's screen width */
long id; /* This is the 32 bit CRC of the user's name */
int msgposted; /* Number of messages posted */
char comment[80]; /* Comment for advanced user editors */
byte help; /* <reserved> (**) */
word baud_rate; /* Last call connection speed */
byte counter[MAXCOUNTER]; /* General pourpouse counters */
word chat_minutes; /* Minutes used today to chat with Sysop */
bit xfer_prior:1; /* 1=No download limits */
bit quiet :1; /* <reserved> (**) */
bit nerd :1; /* 1=Yell don't bell for this user */
char protocol; /* <reserved> (**) */
char archiver; /* <reserved> (**) */
struct _ovr_class_rec {
int max_time; /* Minutes per day */
int max_call; /* Minutes per call */
int max_dl; /* Download limit */
word ratio; /* Download/Upload ratio */
word min_baud; /* Minimum logon baud */
word min_file_baud; /* Minimum download bad */
word start_ratio; /* Start ratio */
} ovr_class;
int sig; /* <reserved> (**) */
word account; /* Account for time bank */
word f_account; /* Account for file bank */
int votes; /* Holds votes received */
char extradata[28]; /* Reserved for future use */
/* Total=640 bytes */
};
#define SIZEOF_MSGAREA 224
#define SIZEOF_FILEAREA 225
struct _sys /* Structure for the internal system records.
The files SYSMSG.DAT and SYSFILE.DAT
are composed by the respective portions of this
structure */
{
/* Begin of the SYSMSG.DAT file --------------------------------------- */
char msg_name[70]; /* Message area name */
int msg_num; /* Message area number */
char msg_path[40]; /* Message area path */
char origin[56]; /* Echomail origin line */
bit echomail :1; /* 1=Echomail area */
bit netmail :1; /* 1=Netmail area */
bit public :1; /* 1=Public message allowed */
bit private :1; /* 1=Private message allowed */
bit anon_ok :1; /* 1=Use the user's handle in the from field */
bit no_matrix :1; /* <reserved> (**) */
bit squish :1; /* Squish<tm> message area */
word msg_sig; /* <reserved> (**) */
char echotag[32]; /* Echotag name */
word pip_board; /* Pip-base board number */
byte quick_board; /* QuickBBS board number */
byte msg_priv; /* Minimum level to access this area */
long msg_flags; /* Flags settings */
byte write_priv; /* Minimum level to write messages */
long write_flags; /* Flags settings */
byte use_alias; /* Use alias # with this area */
int max_msgs; /* Maximum number of messages in this area */
int max_age; /* Max age of messages (days) */
int age_rcvd; /* Max age of received messages (days) */
/* End of the SYSMSG.DAT file ----------------------------------------- */
/* Begin of the SYSFILE.DAT file -------------------------------------- */
char file_name[70]; /* File area name */
int file_num; /* File area number */
char uppath[40]; /* Upload path */
char filepath[40]; /* Download path */
char filelist[50]; /* CD-ROM list file name */
bit freearea :1; /* Free download limit */
bit norm_req :1; /* <reserved> (**) */
bit know_req :1; /* <reserved> (**) */
bit prot_req :1; /* <reserved> (**) */
bit nonews :1; /* <reserved> (**) */
bit no_global_search :1; /* 1=Exclude from global searches */
bit no_filedate :1; /* <reserved> (**) */
word file_sig; /* <reserved> (**) */
byte file_priv; /* Minimum level to access this area */
long file_flags; /* Flags settings */
byte download_priv; /* Minimum level to download files */
long download_flags; /* Flags settings */
byte upload_priv; /* Minimum level to upload files */
long upload_flags; /* Flags settings */
byte list_priv; /* Minimum level to see the file titles */
long list_flags; /* Flags settings */
/* End of the SYSFILE.DAT file ---------------------------------------- */
};
struct _sys_idx /* Structure for the SYSMSG.IDX, SYSFILE.IDX files */
{
byte priv; /* Area's privilege level */
byte flags[MAXFLAGS]; /* Flags settings */
char key[13]; /* <reserved> */
word area; /* Area absolute number */
};
/* Privilege levels definitions */
#define TWIT 0x10
#define DISGRACE 0x20
#define LIMITED 0x30
#define NORMAL 0x40
#define WORTHY 0x50
#define PRIVIL 0x60
#define FAVORED 0x70
#define EXTRA 0x80
#define CLERK 0x90
#define ASSTSYSOP 0xA0
#define SYSOP 0xB0
#define HIDDEN 0xC0
struct _sysinfo /* Structure for the SYSINFO.DAT file */
{
long quote_position; /* Last position in the quote file */
unsigned long total_calls; /* Total system calls */
char pwd[40]; /* Keyboard password (crypted) (*) */
unsigned long local_logons; /* Number of local logons */
unsigned long calls_300; /* Number of 300 baud calls */
unsigned long calls_1200; /* Number of 1200 baud calls */
unsigned long calls_2400; /* Number of 2400 baud calls */
unsigned long calls_9600; /* Number of 9600+ baud calls */
unsigned long calls_14400; /* Number of 14400+ baud calls */
unsigned long failed_password; /* <reserved> (**) */
unsigned long normal_logoff; /* <reserved> (**) */
unsigned long lost_download; /* <reserved> (**) */
unsigned long lost_carrier; /* <reserved> (**) */
unsigned long out_of_time; /* <reserved> (**) */
unsigned long idle_logoff; /* <reserved> (**) */
unsigned long sysop_logoff; /* <reserved> (**) */
unsigned long new_users; /* <reserved> (**) */
unsigned long file_ratio; /* <reserved> (**) */
unsigned long kbytes_ratio; /* <reserved> (**) */
unsigned long minutes_online; /* <reserved> (**) */
unsigned long mailer_online; /* <reserved> (**) */
};
#define BROWSING 1
#define UPLDNLD 2
#define READWRITE 3
#define DOOR 4
#define CHATTING 5
#define QUESTIONAIRE 6
struct _useron /* Structure for the USERON.BBS file */
{
char name[36]; /* User's name */
int line; /* Task number currently on */
word baud; /* Baud rate */
char city[26]; /* User's city */
bit donotdisturb: 1; /* Do not disturb flag */
int status; /* User's status */
int cb_channel; /* CB Chat System channel */
};
struct _lastcall /* Structure for the LASTCALL.BBS file */
{
int line; /* Task number */
char name[36]; /* User's name */
char city[26]; /* User's city */
word baud; /* Baud rate */
long times; /* Times the user has called the system */
char logon[6]; /* Logon time HH:MM */
char logoff[6]; /* Logoff time HH:MM */
};
struct _menu_header /* Header of the *.MNU files
Menus are structured as follow:
<_menu_header>
<_cmd> \
...... |- _menu_header.n_elem
<_cmd> /
<_menu_header>
<_cmd> \
...... |- _menu_header.n_elem
<_cmd> /
..............
*/
{
char name[14]; /* Menu' name */
int n_elem; /* Number of struct _cmd records for this menu */
};
struct _cmd /* Structure for the *.MNU files */
{
char name[80]; /* User's display */
byte priv; /* Minimum level for this command */
byte flags[MAXFLAGS]; /* Minimum flags setting */
int flag_type; /* Type of command */
bit automatic: 1; /* Automatic execution */
bit nocls: 1; /* Don't clear the screen if change menu' */
bit first_time:1; /* Executed only the first time the menu' is read */
byte color; /* Normal background and foreground colors */
byte first_color; /* Hilight background and foreground colors */
byte hotkey; /* Key that activate the command */
char argument[50]; /* Optional argument list */
};
struct _mail /* Structure for the MSGTOIDX.DAT file */
{
char to[36]; /* Recipient's name */
word area; /* Message area number */
word msg_num; /* Message number */
};
struct _lorainfo /* Structure for the LORAINFO.Txx file.
xx=Task number in two digit hex number */
{
struct _usr usr; /* The complete user record */
word baud; /* The current baud rate */
int port; /* The current comm port number */
int time; /* Minutes remaining for this call */
char log[40]; /* Log file name */
char system[80]; /* System name */
char sysop[36]; /* Sysop's name */
word task; /* Current task number */
word max_baud; /* Maximum modem baud rate */
long posuser; /* User's position in the user file */
word yelling; /* Number of times the user has requested
for a chat */
word downloadlimit; /* User's download limit */
int max_time; /* User's maximum on line time in 24h */
int max_call; /* User's maximum on line time for call */
word ratio; /* Download/upload ratio limit (0=No limit) */
word min_baud; /* Minimum baud rate for user's level */
word min_file_baud; /* Minimum baud rate for file transfers */
bit wants_chat :1; /* 1=The user has request a chat */
bit mnp_connect :1; /* 1=MNP connection */
bit keylock :1; /* 1=The keyboard is locked */
char logindate[20]; /* User's login date */
char password[40]; /* Keyboard password (crypted) (*) */
unsigned long total_calls; /* Total system calls */
};
/*
(*) All the passwords are crypted with a proprietary algorithm for
system safety. Only known third party authors can request to the
autor the functions to perform the decryption/encryption.
(**) Reserved fields are fields that aren't used as for now or are bytes
reserved for future enhancements.
*/